<!--
 * @Author: your name
 * @Date: 2021-05-25 15:28:06
 * @LastEditTime: 2021-05-25 23:09:52
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \遵义报名\zunyi\src\components\pagination.vue
-->
<template>
  <div class="pagination">
    <el-pagination
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-size="size"
      layout="total, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
    props:{
        total:{//总条数
            type:Number,
            default:10
        },
        size:{
            type:Number,
            default:10
        },
        currentPage:{
            type:Number,
            default:1
        }
    },
    model:{
        prop:"currentPage",
        event:"change"
    },
  methods: {
    handleCurrentChange(idx) {
        this.$emit("change",idx)
    },
  },
};
</script>

<style lang="scss" scoped>
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}
</style>